/** 
* All Rights Reserved , Copyright (C) 2020 , 青岛鼎信通讯股份有限公司
* 
* MeetRoomManageServiceAuto
* 会议室管理
* 
* 修改纪录
* 2020-10-26 版本：1.0 wanghongwei 创建。
* @version 版本：1.0
* @author 作者：wanghongwei
* 创建日期：2020-10-26
*/

package com.topscomm.meet.service.impl.auto;

import java.util.Map;

import javax.annotation.Resource;

import com.topscomm.basic.IBasicDao;
import com.topscomm.meet.MeetService;
import com.topscomm.meet.dao.IMeetRoomManageDao;
import com.topscomm.meet.pojo.MeetRoomManageEntity;
import com.topscomm.tap.common.DatacodeCache;

public class MeetRoomManageServiceAuto extends MeetService<MeetRoomManageEntity, IMeetRoomManageDao> {

	/**
	 * @author: wanghongwei
	 * @date: 2020-10-26
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("state") != null) {
			temp = mapRow.get("state").toString();
			mapRow.put("dispstate", datacodeCache.getValueDynamic("TapApprovalBillState", temp, "code", "name"));
		}
		if (mapRow.get("deptcode") != null) {
			temp = mapRow.get("deptcode").toString();
			mapRow.put("dispdeptcode", datacodeCache.getValueDynamic("CboDeptFull", temp, "code", "name"));
		}
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
		if (mapRow.get("type") != null) {
			temp = mapRow.get("type").toString();
			mapRow.put("disptype", datacodeCache.getValueDynamic("MeetRoomType", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "meetRoomManageDao")
	public void setDao(IBasicDao<MeetRoomManageEntity> dao) {
		super.setDao(dao);
	}
}
